package com.jianhua.backend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jianhua.backend.domain.dto.CreateOrderDto;
import com.jianhua.backend.domain.dto.OrderDto;
import com.jianhua.backend.domain.entity.Orders;
import com.jianhua.backend.domain.vo.PageVo;
import com.jianhua.backend.request.OrderDetailResponse;

import java.util.List;

/**
 * <p>
 * 存储用户订单的核心信息 服务类
 * </p>
 *
 * @author author
 * @since 2025-07-02
 */
public interface OrdersService extends IService<Orders> {

    String createOrder();

    boolean payOrder(String orderId);

    OrderDetailResponse getOrderDetail(String id);

    PageVo<Orders> listOrders(OrderDto orderDto);

    /**
     * 根据用户ID查询订单列表
     * @param id 用户ID
     * @return 订单列表
     */
    List<Orders> listOrders(Integer id);

    /**
     * 创建订单
     * @param createOrderDto 创建订单的请求体
     */
    void createOrder(CreateOrderDto createOrderDto);

}